1. Field of the Invention
The present invention relates generally to an improved data processing system and in particular, to a computer implemented method and apparatus for resource management. More particularly, the present invention is directed to a computer implemented method, apparatus, and computer usable program product for resource management by interleaving of runtime processing and application execution.
2. Description of the Related Art
A computer system has a finite amount of system resources for running an operating system and other software applications. System resources include, for example, memory and processor resources. Some software applications require varying levels of system resources. For example, a software application executing on the computer system may be virtually inactive and require minimal system resources or fully active and consume in excess of 90 percent of the available system resources. Problems may arise when the performance of necessary system management tasks occurs during the execution of one or more applications on the computer system.
For example, some system management tasks, such as a JAVA™ system management task, includes garbage collection. Traditional garbage collection implementations use a “stop-the-world” approach to recovering heap memory. This approach enables the application to run until the memory heap is exhausted of free memory. At this point, the garbage collection system management task stops all application code, performs a garbage collection, and then allows the application to continue.
Stopping the application code to complete system management tasks is undesirable and may prove problematic. For example, ceasing the execution of software applications that direct flight controls is dangerous and may result in catastrophic consequences.
One currently used solution to address this problem is by performing system management tasks in increments. For example, incremental garbage collectors introduce pause times during garbage collection so that the garbage collection task is more predictable and can occur at set intervals over a period of time. Incremental garbage collection may reduce the number of times that a memory heap is entirely exhausted, or reduce the amount of time that an application is suspended while garbage collection replenishes the memory heap.
However, garbage collection times are predetermined and scheduled independently of the execution of applications. Thus, the execution of applications may still be interrupted by the performance of system management tasks, especially at times when the application consumes large amounts of system resources.